//Accepted
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
 
using namespace std;
typedef long long ll;


char a[101], b[101];
int i, j, n, m, x;

void process(){
	scanf("%s%s", a, b);
	n=strlen(a);
	m=strlen(b);
	x=n;
	if(m<n)x=m;
	
	{
		for(i=0;i<x;++i){
			if(toupper(a[i])<toupper(b[i])){
				printf("-1");
				return;
			}
			else if(toupper(a[i])>toupper(b[i])){
				printf("1");
				return;
			}
		}
	}
	if(n<m){
		printf("-1");
		return;
	}
	else if(m<n){
		printf("1");
		return;
	}

	printf("0");
}

int main(){
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	
	process();
	
	return 0;
}
